//Class representing the King piece

//Import needed ArrayList items
import java.util.ArrayList;

//Inherits Moveable class which inherits Piece class
class King extends Moveable{

	//These are used to keep track if a king has already warped or jumped during a turn


	//Constructor
	public King(String owner, String x, String y, String z, int dir)
	{
		//Call Parent(Moveable) constructor
		super(owner,x,y,z);

		//Create the location objects that reflect relative move positions when added to current position

		//Sticking to same board..
		Location move1 = new Location(1,1,0);//King can move diagonally forward or back
		Location move2 = new Location(1,-1,0);
		Location move3 = new Location(-1,1,0);
		Location move4 = new Location(-1,-1,0);

		//Changing to board+1
		Location move5 = new Location(0,0,1);//King can move diagonally forward or back

		//Changing to board-1
		Location move6 = new Location(0,0,-1);//King can move diagonally forward or back



		//Create Location ArrayList to hold the relative move positions
		ArrayList<Location> movePossibilities = new ArrayList<Location>();
		movePossibilities.add(move1);//Add the relative move positions to the ArrayList
		movePossibilities.add(move2);
		movePossibilities.add(move3);
		movePossibilities.add(move4);
		movePossibilities.add(move5);
		movePossibilities.add(move6);
		movePositions = movePossibilities;//Set the instance variable of Moveable class to the ArrayList we created

		isVisible = true;  //Kings are visible on the board, so set to true
		warp = true;  //Kings can move to another board, so set to true
		hasWarped = false;
		hasJumped = false;
		jumpable = true;
		passable = false;
		explodeOnEnemyContact = false;
		destroyEnemyOnContact = false;
		canWarpAndMove = true;
		safeOnContact = false;
		moveRange = 1;
		jumpRange=1;
		direction = dir;
	}

}